<%--
  Created by IntelliJ IDEA.
  User: lee
  Date: 16-10-24
  Time: 下午11:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html ng-app="sysModule">
<head>
    <title>系统管理</title>
    <script src="<%=request.getContextPath()%>/js/angular-1.0.8/angular.js"></script>
    <script src="<%=request.getContextPath()%>/js/angular-1.0.8/angular-route.min.js"></script>
    <script type="text/javascript">
       var sysModule=angular.module("sysModule",[]);

        sysModule.controller("sysController",function($scope){
            $scope.admin={};
            $scope.admin.showAddWin=false;
            $scope.admin.showQryWin=false;
            $scope.admin.loginname='';
            $scope.admin.password='';
            $scope.admin.name='';

            $scope.openAddWin=function(){
                $scope.admin.showAddWin=!$scope.admin.showAddWin;
                $scope.admin.showQryWin=false;
            };

            $scope.openQryWin=function(){
                $scope.admin.showAddWin=false;
                $scope.admin.showQryWin=!$scope.admin.showQryWin;
            };

            $scope.addUser=function(){
                alert("添加成功");
            }
        })
    </script>
</head>
<body ng-controller="sysController">

<button id="btn1" ng-click="openAddWin()">添加管理员</button>
<button id="btn2" ng-click="openQryWin()">检索管理员</button>

<div id="d-admin-add" ng-show="admin.showAddWin">
    <h2>管理员添加</h2>
    <label for="admin.loginame">登陆名</label><input type="text" id="admin.loginame" ng-model="admin.loginname"/> <br>
    <label for="admin.password">密码</label><input type="password" id="admin.password" ng-model="admin.password"/> <br>
    <label for="admin.name">姓名</label><input type="text" id="admin.name" ng-model="admin.name"/> <br>

    <label for="ck1">图书管理权限</label><input type="checkbox" id="ck1"> <br>
    <label for="ck1">读者管理权限</label><input type="checkbox" id="ck2"> <br>
    <label for="ck1">参数设置权限</label><input type="checkbox" id="ck3"> <br>

    <button id="btnAdd" ng-click="addUser()">添加</button>


</div>
<div id="d-admin-qry" ng-show="admin.showQryWin">
    <h2>检索管理员</h2>
<table border="1">
    <thead>
    <tr>
        <td>编号</td>
        <td>用户名</td>
        <td>密码</td>
        <td>姓名</td>
        <td>图书管理权限</td>
        <td>读者管理权限</td>
        <td>参数设置权限</td>
        <td>操作</td>
    </tr>
    </thead>
    <tbody>

    <tr>
        <td>1</td>
        <td>admin</td>
        <td>9999</td>
        <td></td>
        <td>1</td>
        <td>1</td>
        <td>1</td>
        <td><a href="#">修改</a><a href="#">删除</a></td>
    </tr>
    <tr>
        <td>2</td>
        <td>lib01</td>
        <td>9999</td>
        <td></td>
        <td>0</td>
        <td>0</td>
        <td>0</td>
        <td><a href="#">修改</a><a href="#">删除</a></td>
    </tr>
    <tr>
        <td>3</td>
        <td>lib02</td>
        <td>9999</td>
        <td></td>
        <td>0</td>
        <td>0</td>
        <td>0</td>
        <td><a href="#">修改</a><a href="#">删除</a></td>
    </tr>
    <tr>
        <td>4</td>
        <td>11</td>
        <td>11</td>
        <td>11</td>
        <td>0</td>
        <td>0</td>
        <td>1</td>
        <td><a href="#">修改</a><a href="#">删除</a></td>
    </tr>
    <tr>
        <td>5</td>
        <td>b</td>
        <td>b</td>
        <td>asdfasd</td>
        <td>0</td>
        <td>0</td>
        <td>1</td>
        <td><a href="#">修改</a><a href="#">删除</a></td>
    </tr>
    </tbody>
</table>
</div>
</body>
</html>
